# Makefile ptz
ROOTDIR = ..
include $(ROOTDIR)/Rules.make

CFLAGS := -Wall -g -D_XOPEN_SOURCE=500 -I $(ROOTDIR)/include $(INC_PATH)

SRCS    :=  $(wildcard *.c)
OBJS    :=  $(SRCS:%.c=%.o)
OTHER	:=  $(wildcard *~)

TARGET := s485

$(TARGET):$(OBJS)
	$(CC) $(CFLAGS) -lpthread -lm -o $@ $^ $(LIBS) $(ROOTDIR)/lib/libmegaEyes.a $(ROOTDIR)/lib/libnmea.a
	cp -f $(TARGET) $(ROOTDIR)/bin/

clean:
	@rm -f $(TARGET)
	@rm -f $(OBJS)
	@rm -f $(OTHER)
